﻿using System.ComponentModel.DataAnnotations.Schema;

namespace Canteen.Core.Models
{
    /// <summary>
    /// 消费订单商品明细列表
    /// </summary>
    public class ShopOrderProducts : BaseEntity
    {
        //订单ID
        [ForeignKey("ShopOrderId")]
        public int ShopOrderId { get; set; }//ShopOrder外键
        public virtual ShopOrder ShopOrder { get; set; }//ShopOrder导航属性

        //商品ID
        [ForeignKey("ProductId")]
        public int ProductId { get; set; }//Product外键
        public virtual Product Product { get; set; }//Product导航属性

        public int Number { get; set; }//数量
        [Column(TypeName = "MONEY")]
        public decimal? Price { get; set; }//单价
    }
}
